<%@ Page Language="C#" debug="false" Culture="it-IT" trace="false" EnableViewState="false"%>
<%@ Register TagPrefix="dammela" Namespace="whole" Assembly = "dammela"%>
<%@ Register TagPrefix="dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>


<script runat="server">
void Page_Load(Object sender,EventArgs e)
{
	// Set the title.
	Chart.Title="Distribuzione per titolo di studio";

	// Set 3D
	Chart.Use3D = true;

	// Set the chart Type
	Chart.Type = ChartType.Pie;		

	// Set default transparency
	Chart.DefaultSeries.DefaultElement.Transparency = 20;

	// Set the directory where the images will be stored.
	Chart.TempDirectory="temp";

	// Set he chart size.
	Chart.Width = 500;
	Chart.Height = 350;

	// Add the random data.
SqlConnection sqlConn = new SqlConnection();
sqlConn.ConnectionString = ConfigurationSettings.AppSettings["SQLstring"];

SqlCommand selectCMD = new SqlCommand("exec mela_stats_usersByEdu", sqlConn );
selectCMD.CommandTimeout = 30;

SqlDataAdapter custDA = new SqlDataAdapter();
custDA.SelectCommand = selectCMD;

sqlConn.Open();

DataTable dt = new DataTable();
custDA.Fill(dt);

sqlConn.Close();

	Chart.Series.Data = dt;
	Chart.SeriesCollection.Add();
    
    
}
</script>
<HTML><HEAD>
<title>goparty.it - statistiche</title>
<LINK type="text/css" rel="stylesheet" href="/main.css">
<meta http-equiv="Content-Type" Content="text/html; charset=ISO-8859-1">
<dammela:scripts ID="Scripts1" runat="server"/></head>
<body class="body" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" id="body" runat="server">
&#160;<p/>
<a style="margin:10px;" class="black" href="/stats.aspx">Torna alla home delle statistiche</a>
<p/>
<DIV align=center>
 <dotnet:Chart id="Chart"  runat="server"/>
</DIV>
</BODY>
</BODY>
</HTML>